package com.example.sbaclient;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;

@SpringBootApplication
@RestController
@EnableScheduling // 开启定时任务
@EnableCaching // 开启缓存功能
public class SbaclientApplication {

    public static void main(String[] args) {
        SpringApplication.run(SbaclientApplication.class, args);
    }

    @GetMapping("hello")
    public String sayHi() {
        return String.format("<h1>Hello,Spring Boot,DateTime:%s</h1>", LocalDateTime.now());
    }
}
